<template>
	<view class="">
		<view class="indexHeaBox">
			<view class="leftImg" @click="open2">
				<image v-if="$i18n.locale == 'ft'" src="../../static/img/zh.png" alt=""></image>
				<image v-if="$i18n.locale == 'en'" src="../../static/img/en.png" alt=""></image>
				<image v-if="$i18n.locale == 'jp'" src="../../static/img/rb.png" alt=""></image>
				<image v-if="$i18n.locale == 'ko'" src="../../static/img/hg.png" alt=""></image>
				<image v-if="$i18n.locale == 'zh'" src="../../static/img/zh.png" alt=""></image>
				<p v-if="$i18n.locale == 'ft'">港澳繁體</p>
				<p v-if="$i18n.locale == 'en'">English</p>
				<p v-if="$i18n.locale == 'jp'">にほんご</p>
				<p v-if="$i18n.locale == 'ko'">한국어</p>
				<p v-if="$i18n.locale == 'zh'">中文简体</p>
			</view>
			<view class="mask2" v-if="show2">
				<view @click="lang('en')">
					<img src="../../static/img/en.png" alt="">
					<text>English</text>
				</view>
				<view @click="lang('ft')">
					<img src="../../static/img/zh.png" alt="">
					<text>港澳繁體</text>
				</view>
				<view @click="lang('zh')">
					<img src="../../static/img/zh.png" alt="">
					<text>中文简体</text>
				</view>
				<view @click="lang('jp')">
					<img src="../../static/img/rb.png" alt="">
					<text>にほんご</text>
				</view>
				<view @click="lang('ko')">
					<img src="../../static/img/hg.png" alt="">
					<text>한국어</text>
				</view>
			</view>
			<view class="rightImg">
				<!-- <image @click="goPage('../recentNews/index')" src="../../static/images/41.png" mode=""></image>
				<view class="rightImgLine"></view> -->
				<image @click="islogin()" src="../../static/images/23.png" mode=""></image>
				<view v-if="info.email" class="rightImgName">
					{{info ? info.email : $t('login.title35')}}
				</view>
				<image @click="loginouts()" class="logout" src="../../static/images/logout.png" mode=""></image>
			</view>
			<view class="sjhsuid">
				UID：{{info ? info.uid : ""}}
			</view>
		</view>
		<view class="indexNav">
			<view class="indexNavIt" v-for="(item,index) in navList" :key="index" @click="goPage(item.path)">
				<image :src="item.img" mode=""></image>
				{{item.title}}
			</view>
		</view>
		<view class="linehjghj">
			<view class="lineLeft">

			</view>
		</view>
		<view class="tongjiBox">
			<view class="tongjiBoxTitle">
				{{$t('indexTitle.title1')}}
			</view>
			<view class="tongjiNav">
				<div class="conNavOneItdada">
					<div class="conNavOneItRiButs">
						<u-button type="primary" :custom-style="customStyleOne" size="mini"
							@click="gocunkuan()">{{$t('indexTitle.title3')}}</u-button>
						<u-button type="primary" :custom-style="customStyleThree" size="mini"
							@click="gozhuanzhang(0)">{{$t('indexTitle.title4')}}</u-button>
					</div>
					<view class="conNavOneItRiBut" @click="gorecord(1)">
						<img src="../../static/images/55.png" alt="">
						<div class="conNavOneItRi">
							<p>{{$t('allocation.title10')}}</p>
							<p>{{balance[0] || '0.00'}} <br />USD</p>
						</div>
					</view>
				</div>
				<div class="conNavOneItdada" style="background-color: #ffca93;">
					<div class="conNavOneItRiButs">
						<u-button type="primary" :custom-style="customStyleOne" size="mini"
							@click="gotixian(0)">{{$t('indexTitle.title4s')}}</u-button>
						<u-button type="primary" :custom-style="customStyleThree" size="mini"
							@click="gozhuanzhang(1)">{{$t('indexTitle.title4')}}</u-button>
					</div>
					<view class="conNavOneItRiBut" @click="gorecord(2)">
						<img src="../../static/images/55.png" alt="">
						<div class="conNavOneItRi">
							<p>{{$t('allocation.title11')}}</p>
							<p>{{balance[1] || '0.00'}} <br />USD</p>
						</div>
					</view>
				</div>
				<div class="conNavOneItdada" style="background-color: #8ec8fa;">
					<div class="conNavOneItRiButs">
						<u-button type="primary" :custom-style="customStyleOne" size="mini"
							@click="gotixian(1)">{{$t('indexTitle.title4s')}}</u-button>
						<u-button type="primary" :custom-style="customStyleThree" size="mini"
							@click="gozhuanzhang(2)">{{$t('indexTitle.title4')}}</u-button>
					</div>
					<view class="conNavOneItRiBut" @click="gorecord(3)">
						<img src="../../static/images/55.png" alt="">
						<div class="conNavOneItRi">
							<p>{{$t('allocation.title12')}}</p>
							<p>{{balance[2] || '0.00'}} <br />USD</p>
						</div>
					</view>
				</div>
				<!-- <div class="conNavOneItdada" style="background-color: #277af5;">
					<img src="../../static/images/55.png" alt="">
					<div class="conNavOneItRi">
						<p>{{$t('allocation.title13')}}</p>
						<p>{{balance[3] || '0.00'}} USD</p>
						<div class="conNavOneItRiBut">
							<u-button type="primary" :custom-style="customStyleThree" size="mini" style="width: 96rpx;"
								@click="gozhuanzhang(3)">{{$t('indexTitle.title4')}}</u-button>
						</div>
					</div>
				</div> -->
			</view>
		</view>
		<view class="conLineBox"></view>
		<!-- <div class="conTitOneTit">
			· {{$t('allocation.title')}} ·
		</div> -->
		<div class="cons" style="border-bottom: 10rpx solid #ededed;margin-top: 30rpx;">
			<div class="rechargetitle">
				<view></view>
				{{$t('allocation.title1')}}:
			</div>
			<div class="consitem conListBoxIt" v-for="(item,index) in list" :class="select == item.id ? 'bgs' : ''"
				@click="changeselect(item.id)" v-if="select == item.id">
				<div class="cileft">
					<div class="cilefttop">{{item.money[0]}} - {{item.money[item.money.length - 1]}}</div>
					<div class="cileftbottom">
						<div class="cilbleft">{{$t('allocation.title4')}}:</div>
						<div class="cilbright">{{item.ratename}}</div>
					</div>
				</div>
				<div class="conListBoxItimgbox">
					<image class="icon2" src="../../static/images/90.png" mode=""></image>
					<image class="icon3" src="../../static/images/91.png" mode=""></image>
					<image class="icon1" src="../../static/images/92.png" mode=""></image>
					<p>{{item.days}}</p>
				</div>
				<!-- <image class="ciright" src="../../static/images/pei1.png" mode=""></image> -->
			</div>
			<!-- <div class="consitems">
				<div class="cisleft cisleft1">{{$t('allocation.title5')}}:</div>
				<div class="cisright cisright1" v-for="(item,index) in selectpeizhi.money" :key="index" :class="select1 == index ? 'bgs' : ''" @click="changeselect1(index,item)">{{item}} USD</div>
			</div> -->
			<div class="consitems">
				<div class="cisleft">{{$t('allocation.title6')}}:</div>
				<div class="cisright" v-for="(item,index) in selectpeizhi.month" :key="index" :class="select2 == index ? 'bgs' : ''" @click="changeselect2(index,item)">
					{{item}}{{$t('allocation.title24')}}</div>
			</div>
			<!-- <div class="consitems">
				<div class="cisleft">{{$t('allocation.title7')}}:</div>
				<div class="cisright bgsuuu">-</div>
			</div>
			<div class="consitems">
				<div class="cisleft">{{$t('allocation.title8')}}:</div>
				<div class="cisright bgsuuu">-</div>
			</div>
			<div class="consitems">
				<div class="cisleft">{{$t('allocation.title9')}}:</div>
				<div class="cisright bgsuuu">-</div>
			</div> -->
		</div>
		<div class="cons">
			<div class="conslist">
				<div class="consitem1">
					<image class="icons" src="../../static/images/5.png" mode=""></image>
					<div class="ci1text">{{$t('allocation.title10')}}:</div>
					<div class="ci1right">
						<input type="number" step="1" class="ci1right-left" :placeholder="balance[0]" v-model="peizhinumber1" @input="jisuan()">
						<!-- <div class="ci1right-left">{{balance[0] || '0.00'}}</div> -->
						<div class="ci1right-right">USD</div>
					</div>
				</div>
				<div class="consitem1">
					<image class="icons" src="../../static/images/5.png" mode=""></image>
					<div class="ci1text">{{$t('allocation.title11')}}:</div>
					<div class="ci1right">
						<input type="number" step="1" class="ci1right-left" :placeholder="balance[1]" v-model="peizhinumber2" @input="jisuan1()">
						<!-- <div class="ci1right-left">{{balance[1] || '0.00'}}</div> -->
						<div class="ci1right-right">USD</div>
					</div>
				</div>
				<div class="consitem1">
					<image class="icons" src="../../static/images/15.png" mode=""></image>
					<div class="ci1text">{{$t('allocation.title12')}}:</div>
					<div class="ci1right">
						<input type="number" step="1" class="ci1right-left" :placeholder="balance[2]" v-model="peizhinumber3" @input="jisuan2()">
						<!-- <div class="ci1right-left">{{balance[2] || '0.00'}}</div> -->
						<div class="ci1right-right">USD</div>
					</div>
				</div>
				<!-- <div class="consitem1">
					<image class="icons" src="../../static/images/15.png" mode=""></image>
					<div class="ci1text">{{$t('allocation.title13')}}:</div>
					<div class="ci1right">
						<div class="ci1right-left">{{balance[3] || '0.00'}}</div>
						<div class="ci1right-right">USD</div>
					</div>
				</div> -->
			</div>
			<view class="checkbox" style="display:none;">
				<label>
					<checkbox checked="true" />{{$t('allocation.title14')}}
				</label>
			</view>
			<div class="queren" @click="submitdingyue">{{$t('allocation.title2')}}</div>
		</div>
		
		<view class="conListBox">
			<view class="conListBoxIt">
				<!-- <view class="conTitTowLeft">
					<view class="yuanBox"></view>
					<p>{{$t('configuration.title3')}}</p>
				</view>
				<view class="xiaofeiText">
					<view class="tongjiTexTit">
						<view class="lineFour lineTowBox"></view>
						<P>{{$t('indexTitle.title18')}}</P>
					</view>
					<view class="tongjiTexTit">
						<view class="lineFour lineTowBox"></view>
						<P>{{$t('indexTitle.title17')}}LITE</P>
					</view>
					<view class="tongjiTexTit">
						<view class="lineFour lineTowBox"></view>
						<P>{{$t('indexTitle.title17')}}PRO</P>
					</view>
					<view class="tongjiTexTit">
						<view class="lineFour lineTowBox"></view>
						<P>{{$t('indexTitle.title17')}}EXPERT</P>
					</view>
				</view>
				<view class="jintuLine">
					<view class="jintuLineXuanzhong"></view>
				</view> -->
				<view class="conNavOneItRiBut conNavOneItRiButTow">
					<view class="conTitTowLeft">
						<view class="yuanBox"></view>
						<p>{{$t('indexTitle.title17')}}</p>
					</view>
					<!-- <view class="butItewmBox" v-for="(item,index) in countList" :key="index">
						<u-button type="primary" :custom-style="customStyleTow" size="mini">{{item.code}} : {{item.count}}</u-button>
					</view> -->
				</view>
		
				<view class="paimingForm paimingFormTow">
					<view class="paimingFormIt">
						{{$t('indexTitle.title38')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title39')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title40')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title41')}}
					</view>
					<view class="paimingFormIt">
						{{$t('indexTitle.title42')}}
					</view>
				</view>
				<view class="paimingForm" style="margin-top: 0;" v-if="ordersList.length > 0" v-for="(item,index) in ordersList" :key="index">
					<view class="paimingFormIt">
						{{item.number}}
					</view>
					<view class="paimingFormIt">
						{{item.days}}{{$t('activityTitle.title3')}}
					</view>
					<view class="paimingFormIt">
						<!-- {{item.code}} -->
						<u-switch v-if="item.status != 1" v-model="item.fts" size="20" @change="switchchange(item)"></u-switch>
					</view>
					<view class="paimingFormIt">
						{{item.created_at}}
					</view>
					<view class="paimingFormIt" v-if="item.status==0">
						{{Number(item.days) - Number(item.return_days)}}{{$t('activityTitle.title3')}}
					</view>
					<view class="paimingFormIt" v-if="item.status==1">
						{{$t('first.title134')}}
					</view>
				</view>
				<view class="NulllistTxetBox" v-if="ordersList.length==0">
					<image src="../../static/img/empty.png" style="width: 50px;height: 50px;"></image>
					<p>{{$t('indexTitle.title19')}}</p>
				</view>
				<view class="fenye" v-if="ordersList.length > 0">
					<view :class="page > 1 ? 'fyactive':''" @click="prevpage">{{$t('indexTitle.title45')}}</view>
					<view class="fycon">{{page}}/{{totalpage}}</view>
					<view :class="page < totalpage ? 'fyactive':''" @click="nextpage">{{$t('indexTitle.title46')}}</view>
				</view>
			</view>
		</view>
		
		<div class="conTitOneTit">
			<!-- · {{$t('activityTitle.title5')}} · -->
		</div>
		<div class="tishiBox">
			<div class="tishiBoxIt">
				<!-- <image src="../../static/images/59.jpg" alt=""></image> -->
				<div class="tishiBoxItText">
					<div class="tishiBoxItTextTit">
						<div class=""></div>
						<p>{{$t('activityTitle.title6')}}</p>
					</div>
					<div class="tishiBoxItTextCon">
						{{$t('activityTitle.title7')}}
					</div>
				</div>
			</div>
			<div class="tishiBoxIt">
				<div class="tishiBoxItText">
					<div class="tishiBoxItTextTit">
						<div class=""></div>
						<p>{{$t('activityTitle.title8')}}</p>
					</div>
					<div class="tishiBoxItTextCon">
						{{$t('activityTitle.title9')}}
					</div>
				</div>
				<!-- <image src="../../static/images/60.jpg" alt=""></image> -->
			</div>
		</div>
		<div class="conSix">
			<p>{{$t('indexTitle.title24')}}</p>
			<!-- <div class="conSixText">
				<p>{{$t('indexTitle.title25')}}</p>
				<p>{{$t('indexTitle.title26')}}</p>
			</div> -->
		</div>
		<!-- <p class="buttomBoxbut">{{$t('indexTitle.title27')}}</p> -->
		<!-- <div class="bottomTextBox">
			{{$t('indexTitle.title28')}}
		</div> -->
		<view class="notice" v-if="loginout">
			<view class="loginoutbox">
				<view class="lbtitle">{{$t('login.title36')}}</view>
				<view class="lbtitle1">{{$t('login.title37')}}</view>
				<view class="lbbtns">
					<view class="lbbtn1" @click="loginout = false">{{$t('login.title38')}}</view>
					<view class="lbbtn2" @click="logout()">{{$t('login.title39')}}</view>
				</view>
			</view>
		</view>
		<view class="kefu" @click="gokefu">
			<image src="../../static/images/telegram.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	import {
		domains
	} from '../../config/domain.js'
	export default {
		components: {},
		data() {
			return {
				customStyleOne: {
					background: '#fdd02e !important',
					color: '#fff !important',
					border: 'none !important',
					fontSize: '12px !important',
					marginBottom: '5px !important',
				},
				customStyleTow: {
					background: '#5fb4fb !important',
					color: '#fff !important',
					fontSize: '12px !important',
					border: 'none !important',
					marginBottom: '5px !important',
				},
				customStyleThree: {
					background: '#5fb4fb !important',
					color: '#fff !important',
					fontSize: '12px !important',
					border: 'none !important',
					marginBottom: '5px !important',
					marginLeft: '5px !important',
				},
				navList: [{
						'title': this.$t('indexTitle.title29'),
						"img": '../../static/images/3.png',
						"path": '../index/index'
					},
					{
						'title': this.$t('indexTitle.title30'),
						"img": '../../static/images/19.png',
						"path": '../activity/index'
					},
					{
						'title': this.$t('indexTitle.title31'),
						"img": '../../static/images/17.png',
						"path": '../configuration/index'
					},
					{
						'title': this.$t('indexTitle.title33'),
						"img": '../../static/images/15.png',
						"path": '../recharge/record'
					},
					{
						'title': this.$t('indexTitle.title34'),
						"img": '../../static/images/13.png',
						"path": '../vipStructure/vipStructure'
					},
					{
						'title': this.$t('indexTitle.title36'),
						"img": '../../static/images/9.png',
						"path": '../myPlatform/downloadPlatform'
					},
					{
						'title': this.$t('indexTitle.title32'),
						"img": '../../static/images/5.png',
						"path": '../userProfile/index'
					},
					{
						'title': this.$t('indexTitle.title35'),
						"img": '../../static/images/7.png',
						"path": '../recentNews/index'
					},
					// {
					// 	'title': this.$t('indexTitle.title37'),
					// 	"img": '../../static/images/11.png',
					// 	"path": '../ranking/index'
					// },
				],
				show2: false,
				select: 0,
				select1: 0,
				select2: 0,
				info: [],
				loginout: false,
				list: [],
				langs: uni.getStorageSync('lang'),
				balance: [],
				type_id: "",
				number: 0,
				day: 0,
				selectpeizhi:{},
				peizhinumber1:'',
				peizhinumber2:'',
				peizhinumber3:'',
				kefuurl:'',
				fangchong:true,
				
				ordersList:[],
				page:1,
				totalpage:1,
			}
		},
		onLoad(e) {
			this.info = uni.getStorageSync('info')
			this.select = e.id
			this.type_id = e.id
			this.getpeizhidetail()
			this.getorders()
			this.getkefu()
		},
		onShow() {
			this.getbalance()
		},
		onReady() {},
		methods: {
			getkefu(){
				let url = domains + 'api/default/setting?key=sign_kefu';
				let mytype = 'get';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							this.kefuurl = res.data.data
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			getorders(){
				let url = domains + 'api/orders';
				let mytype = 'get';
				let data = {
					page:this.page
				}
				uni.request({
					url,
					method: mytype,
					data,
					header: {
						'content-type': 'application/x-www-form-urlencoded' ,//自定义请求头信息
						'Lang':uni.getStorageSync('lang'),
						'authorization':uni.getStorageSync('tokenNum')
					},
					success: res => {
						if(res.data.code == 0){
							for(let i = 0;i < res.data.data.orders.data.length;i++){
								if(res.data.data.orders.data[i].ft == 0){
									res.data.data.orders.data[i].fts = false
								}
								if(res.data.data.orders.data[i].ft == 1){
									res.data.data.orders.data[i].fts = true
								}
							}
							this.ordersList = res.data.data.orders.data
							this.totalpage = res.data.data.orders.last_page
						}else{
							uni.showToast({//提示
								icon:'none',
								title:res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			switchchange(e){
				let url = domains + 'api/delft';
				let mytype = 'post';
				let data = {
					id:e.id
				}
				uni.request({
					url,
					method: mytype,
					data,
					header: {
						'content-type': 'application/x-www-form-urlencoded' ,//自定义请求头信息
						'Lang':uni.getStorageSync('lang'),
						'authorization':uni.getStorageSync('tokenNum')
					},
					success: res => {
						if(res.data.code == 0){
							this.getorders()
						}else if(res.data.code == 999){
								uni.showToast({//提示
									icon:'none',
									title:res.data.msg
								})
								setTimeout(function(){
									uni.navigateTo({
										url:'/pages/login/newlogin'
									})
								},1500)
							}else{
								uni.showToast({//提示
									icon:'none',
									title:res.data.msg
								})
							}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			prevpage(){
				if(this.page > 1){
					this.page--
					this.getorders()
				}
			},
			nextpage(){
				if(this.page < this.totalpage){
					this.page++
					this.getorders()
				}
			},
			gokefu(){
				window.open(this.kefuurl)
			},
			jisuan(){
				let pei = Number(this.peizhinumber1)
				if(pei > this.balance[0]){
					this.peizhinumber1 = ''
				}
			},
			jisuan1(){
				let pei = Number(this.peizhinumber2)
				if(pei > this.balance[1]){
					this.peizhinumber2 = ''
				}
			},
			jisuan2(){
				let pei = Number(this.peizhinumber3)
				if(pei > this.balance[2]){
					this.peizhinumber3 = ''
				}
			},
			// 订阅
			submitdingyue() {
				if(!this.fangchong){
					return false
				}
				this.fangchong = false
				if (this.type_id == '') {
					uni.showToast({ //提示
						icon: 'none',
						title: this.$t('allocation.title25')
					})
					return false
				}
				let numbers = []
				numbers.push(Number(this.peizhinumber1))
				numbers.push(Number(this.peizhinumber2))
				numbers.push(Number(this.peizhinumber3))
				let url = domains + 'api/miner/submit';
				let mytype = 'post';
				let data = {
					type_id: this.type_id,
					number: JSON.stringify(numbers),
					day: this.day,
				}
				uni.request({
					url,
					method: mytype,
					data,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
							this.fangchong = true
							this.peizhinumber1 = ''
							this.peizhinumber2 = ''
							this.peizhinumber3 = ''
							this.getbalance()
							this.page = 1
							this.getorders()
						} else {
							this.fangchong = true
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					}
				});
			},
			getbalance() {
				let url = domains + 'api/balance';
				let mytype = 'get';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							this.balance = res.data.data
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			getpeizhidetail() {
				let that = this;
				let url = domains + 'api/new_finance_list';
				let mytype = 'get';
				uni.request({
					url,
					method: mytype,
					header: {
						'content-type': 'application/x-www-form-urlencoded', //自定义请求头信息
						'Lang': uni.getStorageSync('lang'),
						'authorization': uni.getStorageSync('tokenNum')
					},
					success: res => {
						if (res.data.code == 0) {
							that.list = res.data.data[0].types
							for(let i = 0;i < that.list.length;i++){
								if(that.list[i].id == that.select){
									that.selectpeizhi = that.list[i]
									that.number = that.list[i].money[0]
									that.day = Number(that.list[i].month[0]) * 30
								}
							}
						} else if (res.data.code == 999) {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
							setTimeout(function() {
								uni.navigateTo({
									url: '/pages/login/newlogin'
								})
							}, 1500)
						} else {
							uni.showToast({ //提示
								icon: 'none',
								title: res.data.msg
							})
						}
					},
					fail: (err) => {
						console.log(err)
					},
					complete: () => {
						setTimeout(function() {
							uni.hideLoading();
						}, 1000);
					}
				});
			},
			islogin() {
				if (this.info) {
					// this.loginout = true;
				} else {
					uni.showToast({ //提示
						icon: 'none',
						title: this.$t('login.title35')
					})
					setTimeout(function() {
						uni.navigateTo({
							url: '/pages/login/newlogin'
						})
					}, 1500)
				}
			},
			loginouts(){
				this.loginout = true;
			},
			logout() {
				uni.removeStorage({
					key: 'token'
				})
				uni.removeStorage({
					key: 'info'
				})
				uni.removeStorage({
					key: 'tokenNum'
				})
				uni.showToast({ //提示
					icon: 'none',
					title: this.$t('login.title40')
				})
				setTimeout(function() {
					uni.navigateTo({
						url: '/pages/login/newlogin'
					})
				}, 1500)
				this.loginout = false
			},
			changeselect(e) {
				let that = this;
				this.select = e;
				this.type_id = e;
				this.select1 = 0
				this.select2 = 0
				for(let i = 0;i < that.list.length;i++){
					if(that.list[i].id == e){
						that.selectpeizhi = that.list[i]
						that.number = that.list[i].money[0]
						that.day = Number(that.list[i].month[0]) * 30
					}
				}
			},
			changeselect1(e, num) {
				this.select1 = e;
				this.number = num;
			},
			changeselect2(e, num) {
				this.select2 = e;
				this.day = Number(num) * 30;
			},
			gorecord(e){
				uni.navigateTo({
					url: '/pages/recharge/record?tab=' + e
				})
			},
			gozhuanzhang(e) {
				uni.navigateTo({
					url: '/pages/recharge/transfer?type=' + e
				})
			},
			gotixian(e) {
				uni.navigateTo({
					url: '/pages/recharge/withdraw?type=' + e
				})
			},
			gocunkuan() {
				uni.navigateTo({
					url: '/pages/recharge/recharge'
				})
			},
			open2() {
				this.show2 = !this.show2
			},
			lang(e) {
				this.$i18n.locale = e;
				localStorage.setItem('lang', e);
				this.show2 = false;
				this.navList = [{
						'title': this.$t('indexTitle.title29'),
						"img": '../../static/images/3.png',
						"path": '../index/index'
					},
					{
						'title': this.$t('indexTitle.title30'),
						"img": '../../static/images/19.png',
						"path": '../activity/index'
					},
					{
						'title': this.$t('indexTitle.title31'),
						"img": '../../static/images/17.png',
						"path": '../configuration/index'
					},
					{
						'title': this.$t('indexTitle.title33'),
						"img": '../../static/images/15.png',
						"path": '../recharge/record'
					},
					{
						'title': this.$t('indexTitle.title34'),
						"img": '../../static/images/13.png',
						"path": '../vipStructure/vipStructure'
					},
					{
						'title': this.$t('indexTitle.title36'),
						"img": '../../static/images/9.png',
						"path": '../myPlatform/downloadPlatform'
					},
					{
						'title': this.$t('indexTitle.title32'),
						"img": '../../static/images/5.png',
						"path": '../userProfile/index'
					},
					{
						'title': this.$t('indexTitle.title35'),
						"img": '../../static/images/7.png',
						"path": '../recentNews/index'
					},
				]
				this.$emit("toTime", "我来自子组件")
			},
			goPage(path) {
				uni.navigateTo({
					url: path
				})
			},
			switchLang() {
				uni.navigateTo({
					url: ''
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	* {
		box-sizing: border-box;
	}

	.conTitOneTit {
		width: 100%;
		text-align: center;
		font-size: 16px;
		color: #000;
		margin: 20px 0px 10px;
	}
.sjhsuid{
		position: absolute;
		top: 42px;
		right: 50px;
	}
	.indexHeaBox {
		width: 100%;
		height: 180px;
		background-image: url('../../static/images/57.jpg');
		background-repeat: no-repeat;
		background-size: 100% 100%;
		display: flex;
		font-size: 12px;
		color: #fff;
		justify-content: space-between;
		padding: 10px 15px;
	}

	.leftImg {
		height: 40px;
		display: flex;
		align-items: center;

		image {
			width: 25px;
			height: 25px;
			margin-right: 5px;
		}
	}

	.rightImg {
		display: flex;
		height: 40px;
		align-items: center;

		image:first-child {
			width: 16px;
			height: 18px;
			margin-right: 5px;
		}
		
		image:last-child {
			width: 18px;
			height: 18px;
		}

		.rightImgLine {
			width: 1px;
			background-color: #fff;
			height: 20px;
			margin: 0px 5px;
		}

		.rightImgName {
			padding: 2px 5px;
			background-color: #6aa3ea;
			color: #000;
		}
	}

	.indexNav {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		margin: 15px 0 10px;

		.indexNavIt {
			width: 25%;
			display: flex;
			align-items: center;
			flex-direction: column;
			font-size: 14px;
			color: #333;
			margin-bottom: 10px;
			text-align: center;
		
			image {
				width: 20px;
				height: 18px;
				margin-bottom: 10px;
			}
		}
		
		.indexNavIt:nth-child(5) image {
			width: 22px;
		}

		.indexNavIt:nth-child(9) image {
			height: 21px;
		}
	}

	.conLineBox {
		width: 100%;
		height: 7px;
		background-color: #ededed;
	}

	.conBox {
		width: 100%;
		padding: 10px 15px 20px;
		margin-top: 10px;
	}

	.conOne {
		background-color: #f1f3ff;
		border-radius: 5px;
	}

	.conSix {
		padding: 40px 20px 30px;
		margin-top: 40px;
		background-image: url('../../static/images/58.jpg');
		background-repeat: no-repeat;
		background-size: 100% 100%;
	}

	.conSix>p:nth-child(1) {
		font-size: 13px;
		font-weight: 600;
		color: #fff;
	}

	.buttomBoxbut {
		width: 300px;
		margin: 30px auto;
		text-align: center;
		line-height: 30px;
		height: 30px;
		font-size: 14px;
		color: #fff;
		cursor: pointer;
		background-color: #fed136;
		border-radius: 30px;
	}

	.conSixText {
		margin: 20px 0px 0;
		text-align: center;
		font-size: 13px;
		color: #fff;
	}


	.conSixText p {
		margin-bottom: 10px;
	}

	.bottomTextBox {
		text-align: center;
		font-size: 12px;
		color: #333;
		margin: 10px 0;
	}

	// .conNavOne {
	// 	width: 70%;
	// 	margin: 0 auto;
	// 	padding-bottom: 10px;
	// 	display: flex;
	// 	align-items: center;
	// 	justify-content: space-between;
	// 	border-bottom: 1px solid #e5e6e9;
	// }

	// .conNavOneIt {
	// 	width: 50%;
	// 	display: flex;
	// 	align-items: center;
	// 	font-size: 13px;
	// 	color: #333;
	// }

	// .conNavOneIt image {
	// 	width: 35px;
	// 	height: 40px;
	// 	margin-right: 5px;
	// }

	// .conNavOneItRi p {
	// 	margin: 0;
	// 	font-size: 12px;
	// 	text-align: left;
	// }

	// .conNavOneItRi p:nth-child(2) {
	// 	color: #5eb7fa;
	// 	margin: 2px 0px;
	// 	font-weight: 600;
	// }

	.conNavOneItRiButs {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 0px auto 10rpx;
	}

	.butItewmBox {
		width: 28%;
	}

	.conTitTow {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.conTitTowLeft {
		display: flex;
		align-items: center;
		font-size: 14px;
		color: #333;
		font-weight: 600;
	}

	.yuanBox {
		width: 8px;
		height: 8px;
		background-color: #5eb7fa;
		border-radius: 50%;
		margin-right: 5px;
	}

	.conThreeTitle {
		width: 95%;
		margin: 0 auto;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 5px;
		border-bottom: 1px solid #e5e6e9;
		font-size: 14px;
		color: #333;
	}

	.conThreeTi {
		font-size: 16px;
		color: #6c83bf;
		position: relative;
	}

	.conThreeTitle p {
		margin: 4px 0;
		margin-right: 10px;
	}

	.lineBox {
		position: absolute;
		width: 60px;
		height: 2px;
		background-color: #6c83bf;
		bottom: -5px;
		left: 0;
	}

	.shujutongjiBox {
		height: 180px;
		padding: 0px 20px;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
	}

	.shujutongjiBox>image {
		width: 70px;
		height: 70px;
	}

	.lianjieBox {
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 13px;
		color: #333;
		margin-top: 10px;
	}

	.lianjieBox image {
		width: 15px;
		height: 15px;
		margin-right: 5px;
	}

	.tongjiText {
		display: flex;
		width: 100%;
		justify-content: flex-end;
	}

	.tongjiTextOne {
		width: 70%;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.tongjiTexTit {
		display: flex;
		align-items: center;
		width: 50%;
		margin-top: 5px;
		font-size: 12px;
		color: #333;
	}

	.tongjiTexTitTow {
		display: flex;
		align-items: center;
		width: 25%;
		font-size: 12px;
		color: #333;
	}

	.tongjiTexTit p {
		margin: 0;
	}

	.tongjiTexTit span {
		color: #5eb7fa;
	}

	.lineOne {
		background-color: #eff3f6;
	}

	.lineTow {
		background-color: #2791ef;
	}

	.lineThree {
		background-color: #f8ea61;
	}

	.lineFour {
		background-color: #58c1fa;
	}

	.lineFive {
		background-color: #ae7ae2;
	}

	.conListBox {
		width: 92%;
		margin: 0px auto;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
	}

	.conListBoxIt {
		width: 100%;
		background-color: #fff;
		border-radius: 2px;
		box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 5px;
		padding: 15px 20px 15px 20px;
		margin-bottom: 20px;
	}

	.conListBoxIt>p {
		width: 100%;
		color: #000;
		text-align: left;
		font-size: 15px;
		overflow: hidden;
	}

	.conListBoxItCon {
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-size: 12px;
		color: #adadad;
		margin: 10px 0;
	}

	.conListBoxItCon>div {
		display: flex;
		align-items: center;
	}

	.conListBoxItCon image {
		width: 15px;
		height: 15px;
		margin-right: 5px;
	}

	.moreBox {
		font-size: 13px;
		color: #333;
		width: 100px;
		text-align: center;
		cursor: pointer;
		height: 25px;
		line-height: 25px;
		margin-top: 20px;
		border: 1px solid #d9d9d9;
	}

	.jintuLine {
		width: 100%;
		margin: 9px auto 10px;
		height: 7px;
		border-radius: 2px;
		background-color: #eef2f5;
	}

	.jintuLineXuanzhong {
		width: 50%;
		height: 7px;
		border-radius: 2px;
		background: linear-gradient(to right, #83c6ef, #238eec);
	}



	.tongjiBox {
		width: 95%;
		margin: 0 auto;
	}

	.tongjiBoxTitle {
		font-size: 15px;
		font-weight: 600;
		margin-bottom: 10px;
	}

	.linehjghj {
		width: 15%;
		margin: 0px auto 20px;
		height: 5px;
		border-radius: 10px;
		background-color: #eaeaea;
	}

	.lineLeft {
		width: 50%;
		border-radius: 10px;
		height: 5px;
		background-color: #277af5;
	}

	.tongjiNav {
		width: 100%;
		margin: 20px 0;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
	}

	.conNavOneItdada {
		width: 32.5%;
		margin-bottom: 5px;
		border-radius: 10px;
		padding: 10px 8px;
		background-color: #938ced;
		font-size: 12px;
		color: #fff;
	}

	.conNavOneItdada img {
		width: 30px;
		height: 26px;
		margin-right: 5px;
	}

	.conNavOneItRi p {
		margin: 0;
		text-align: left;
	}

	.conNavOneItRi p:nth-child(2) {
		// color: #5eb7fa;
		margin: 2px 0px;
		font-weight: 600;
	}

	.conNavOneItRiBut {
		width: 100%;
		display: flex;
		align-items: center;
	}

	.mask2 {
		position: fixed;
		top: 90rpx;
		left: 30rpx;
		z-index: 99;
		background-color: #ffffff;
		border-radius: 50rpx;
		padding: 10rpx 30rpx;
		font-size: 24rpx;
	}

	.mask2 img {
		width: 44rpx;
		height: 44rpx;
		margin-right: 30rpx;
	}


	.mask2 view {
		display: flex;
		color: #000;
		align-items: center;
		margin: 20rpx;
	}

	.tishiBox {
		width: 85%;
		margin: 0px auto;
	}

	.tishiBoxIt {
		// display: flex;
		border-radius: 3px;
		// align-items: center;
		width: 100%;
		margin: 20px 0 0px;
		box-shadow: #e1e9fb 1.95px 1.95px 5px;
	}

	.tishiBoxIt image {
		width: 100%;
		height: 350px;
	}

	.tishiBoxItText {
		width: 100%;
		// height: 350px;
		background-color: #fff;
		padding: 15px 10px 20px 10px;
	}

	.tishiBoxItTextTit {
		display: flex;
		align-items: center;
		font-size: 17px;
		color: #238bdf;
		font-weight: 600;
	}

	.tishiBoxItTextTit>div {
		width: 3px;
		height: 25px;
		background-color: #238bdf;
		margin-right: 5px;
	}

	.tishiBoxItTextCon {
		// padding: 10px 0px 0px 20px;
		font-size: 14px;
		color: #333;
		margin-top: 10px;
		line-height: 30px;
		text-align: left;
	}

	.rechargetitle {
		width: 100%;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		margin-bottom: 30rpx;
		font-size: 28rpx;
		color: #000;
		font-weight: bold;
	}

	.rechargetitle view {
		width: 14rpx;
		height: 14rpx;
		border-radius: 50%;
		background-color: #1a92ff;
		margin-right: 10rpx;
	}

	.cons {
		width: 100%;
		padding: 0 40rpx;
	}

	.consitem {
		width: 95%;
		margin: 0 auto;
		position: relative;
		box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 5px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 40rpx 50rpx;
		margin-bottom: 40rpx;
	}

	.consitem.bgs {
		background-color: #5cb9ff;
	}

	.cileft {
		flex: 1;
	}

	.cilefttop {
		font-size: 32rpx;
		color: #fff;
		font-weight: bold;
		margin-bottom: 20rpx;
	}

	.cileftbottom {
		width: 100%;
		display: flex;
		justify-content: flex-start;
		align-items: center;
	}

	.cilbleft {
		height: 34rpx;
		line-height: 34rpx;
		font-size: 24rpx;
		color: #fff;
		padding: 0 10rpx;
		background-color: #FFD239;
		margin-right: 10rpx;
	}

	.cilbright {
		font-size: 36rpx;
		font-weight: bold;
		color: #fff;
	}

	.ciright {
		width: 100rpx;
		height: 106rpx;
	}

	.consitems {
		width: 100%;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		flex-wrap: wrap;
		margin-bottom: 30rpx;
	}

	.cisleft {
		width: 200rpx;
		text-align: left;
		font-size: 28rpx;
		color: #000;
	}
	.cisleft1{
		margin-top: 14rpx;
	}
	.cisright {
		padding: 14rpx 20rpx;
		border-radius: 10rpx;
		background-color: #f0f0f0;
		font-size: 24rpx;
		color: #000;
		margin-right: 20rpx;
	}
	.cisright1{
		margin-top: 14rpx;
	}

	.cisright.bgs {
		background-color: #5cb9ff;
		color: #fff;
	}

	.cisright.bgsuuu {
		background-color: #fff;
		color: #5cb9ff;
	}

	.cisright:last-child {
		margin-right: 0;
	}

	.conslist {
		width: 100%;
		padding: 0 40rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		flex-wrap: wrap;
		padding-top: 30rpx;
	}

	.consitem1 {
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		margin-bottom: 40rpx;
	}

	.icons {
		width: 60rpx;
		height: 60rpx;
		margin-right: 20rpx;
	}

	.ci1text {
		width: 150rpx;
		font-size: 28rpx;
		color: #000;
		text-align: left;
	}

	.ci1right {
		flex: 1;
		height: 50rpx;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		background-color: #f0f0f0;
		border-radius: 10rpx;
		overflow: hidden;
	}

	.ci1right-left {
		flex: 1;
		font-size: 28rpx;
		color: #000;
		text-align: center;
	}

	.ci1right-right {
		width: 60rpx;
		height: 50rpx;
		text-align: center;
		line-height: 50rpx;
		font-size: 28rpx;
		color: #fff;
		background-color: #5cb9ff;
	}

	.checkbox {
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 24rpx;
		color: #000;
	}

	/deep/ .checkbox .uni-label-pointer {
		line-height: 36rpx;
	}

	/deep/ uni-checkbox .uni-checkbox-input {
		width: 32rpx;
		height: 32rpx;
		border-radius: 50%;
	}

	/deep/ uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
		background-color: #999;
		color: #fff !important;
		margin-top: -4rpx;
	}

	.queren {
		width: 120rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		background-color: #297ef2;
		font-size: 28rpx;
		color: #fff;
		border-radius: 10rpx;
		margin: 40rpx auto;
		cursor: pointer;
	}

	.notice {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1111;
		background-color: rgba(0, 0, 0, .4);
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
	}

	.loginoutbox {
		width: 80%;
		background-color: #fff;
		border-radius: 20rpx;
	}

	.lbtitle {
		width: 100%;
		height: 100rpx;
		font-size: 16px;
		line-height: 100rpx;
		text-align: center;
	}

	.lbtitle1 {
		width: 100%;
		height: 100rpx;
		font-size: 14px;
		line-height: 100rpx;
		text-align: center;
		margin-bottom: 30rpx;
	}

	.lbbtns {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 50rpx;
		margin-bottom: 40rpx;
	}

	.lbbtn1 {
		width: 140rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 10rpx;
		font-size: 14px;
		color: #000;
		background-color: #f0f0f0;
	}

	.lbbtn2 {
		width: 140rpx;
		height: 60rpx;
		text-align: center;
		line-height: 60rpx;
		border-radius: 10rpx;
		font-size: 14px;
		color: #fff;
		background-color: #238bdf;
	}
	.logout{
		width: 40rpx !important;
		margin-left: 10rpx;
	}
	.kefu{
		width: 80rpx;
		height: 80rpx;
		position: fixed;
		bottom: 15%;
		right: 20rpx;
		z-index: 1000;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		
		image{
			width: 80rpx;
			height: 80rpx;
		}
	}
	.conListBoxIt {
		position: relative;
	}
	.conListBoxItimgbox{
		position: absolute;
		top: 18rpx;
		right: 36rpx;
		width: 120rpx;
		height: 82rpx;
	
	}
	.conListBoxItimgbox .icon1{
		width: 100%;
		height: 100%;
		display: none;
	}
	.conListBoxItimgbox .icon2{
		width: 100%;
		height: 100%;
		display: none;
	}
	.conListBoxItimgbox .icon3{
		width: 100%;
		height: 100%;
	}
	.conListBoxItimgbox p{
		position: absolute;
		width: 60rpx;
		font-size: 36rpx;
		color: #238bdf;
		text-align: center;
		font-weight: bold;
		top: 30rpx;
		left: 25%;
		margin-left: 8rpx;
	}
	.conListBoxIt:nth-child(3n-2) .conListBoxItimgbox{
		top: 18rpx;
		right: 44rpx;
		width: 140rpx;
		height: 96rpx;
		
		.icon1{
			display: block;
		}
		.icon3{
			display: none;
		}
		p{
			top: 10rpx;
			left: 50%;
			margin-left: 10rpx;
			font-size: 40rpx;
		}
	}
	.conListBoxIt:nth-child(3n-1) .conListBoxItimgbox{
		top: 18rpx;
		right: 36rpx;
		width: 94rpx;
		height: 82rpx;
		
		.icon2{
			display: block;
		}
		.icon3{
			display: none;
		}
		.icon1{
			display: none;
		}
		p{
			top: 22rpx;
			left: 50%;
			margin-left: -34rpx;
			font-size: 40rpx;
			color: #fff;
		}
	}
	/deep/uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked{
		background-color: #238bdf;
	}
	
	.paimingForm {
		width: 100%;
		display: flex;
		height: 35px;
		margin-top: 10px;
		font-size: 12px;
		align-items: center;
	}
	
	.paimingFormTow {
		background-color: #278cf4;
		color: #fff;
	}
	.paimingFormIt {
		flex: 1;
		display: flex;
		justify-content: center;
		text-align: center;
	}
	
	.paimingFormIt:nth-child(4) {
		flex: 1.4;
	}
	.NulllistTxetBox {
		justify-content: center;
		width: 92%;
		margin: 0px auto;
		align-items: center;
		flex-wrap: wrap;
		font-size: 14px;
		color: #333;
		text-align: center;
		margin-top: 20rpx;
	}
	.fenye{
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 30rpx 0;
		font-size: 28rpx;
		color: #999;
	}
	.fycon{
		color: #000;
	}
	.fyactive{
		color: #000;
	}
</style>